
<script language="JavaScript">
//var msgStr = $("a[href='адрес вашего форума/messages.php'] span").html();
//if ( msgStr ) {
//if (msgStr != 'Сообщения') { 
  //document.write('<object type="application/x-shockwave-flash" width="1" height="1" data="http://kasag.ru/orders/FMP3.swf?mp3=http://kasag.ru/orders/637_Roman-Volyniets.mp3&action=play&title=%D0%BA%D1%83%20%D0%BA%D1%83&loop=yes&lma=no"><param name="quality" value="high" /></object>')
//}
//}
</script>

<?
/*action=savePhone&
orderType=kasko&
tel1=%2B7+916+5950176&
callTime=&
message=&
clientURL=calculation%3Dtm_Infiniti%2Bcar_M%2Bprice_522222%2Bage_5%2Bpower_power100%2Bfr_20000%2Bsto_1%2Boplata_0%2Bhelm_left%2Bperson_natural%2Bcity_msc%2Balarm_immobilizer_chime%2Bdrivers_58_5_m%2Bosago_6_0_0_0_0_0&
carPrice=522222&
manufacturerName=Infiniti&
carName=M&
carAge=carAge5&
fr=0&
stoa=0&
drivers=%2Bdrivers_58_5_m&
id=&
ref=&
realCost=0&
skName=%D0%A0%D0%95%D0%A1%D0%9E-%D0%93%D0%B0%D1%80%D0%B0%D0%BD%D1%82%D0%B8%D1%8F&
email=&
address=&
fio=&
deliveryTime=&
comments=&
alarm=&
alarmList=_immobilizer_chime&
city=msc&
malus=&
newCar=0&
osago=%2Bosago_6_0_0_0_0_0&
guarantee=0&
oplata=0&
status=1&
power=power100&
helm=left&
preOrder=preOrder
*/	

$server="localhost";
$user="aff-pro";
$pass="aff-pro_adm";
$DB="kasko";

$GLOBALS['mysqli_conn1'] = new mysqli($server, $user, $pass, $DB); 

if (mysqli_connect_errno()) { 
	header('Content-type: text/html;charset=utf-8');
    header ("HTTP/1.1 503 Service Unavailable");
         echo '<center><h1>2!!Сервис времено отключен- ведутся работы. Извините за неудобства.</h1></center>';
		  $GLOBALS['mysqli_conn1']->close(); 
		  ?>
<!--LiveInternet counter--><script type="text/javascript"><!--
document.write("<img src='http://counter.yadro.ru/hit?r"+
escape(document.referrer)+((typeof(screen)=="undefined")?"":
";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?
screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
";"+Math.random()+
"' width=1 height=1 alt=''>")//--></script><!--/LiveInternet-->
<?php
          exit(); 
} 

/* Посылаем запрос серверу */ 

if (!$GLOBALS['mysqli_conn1']->set_charset("utf8")) {
    printf("Error loading character set utf8: %s\n", $GLOBALS['mysqli_conn1']->error);
} else {
    //printf("Current character set: %s\n", $GLOBALS['mysqli_conn1']->character_set_name());
}

	
	
	$sql="select * from orders where 1 order by create_time desc";
	if(!$result = $GLOBALS['mysqli_conn1']->query($sql))
	{
		echo "<br>".$sql;
		exit();
	};
	
	echo "<table border=1><tr><td>Время</td><td>id заказа</td><td>Телефон(ФИО)</td><td>Сообщение</td><td>Инфа по машине</td><td>Водители</td><td>По страховке</td></tr>";
	
	while ($row = mysqli_fetch_array($result))
	{
		echo "<tr><td>".date("Ymd H:i",$row['create_time'])."</td><td>".$row['order_id']."</td><td>".$row['tel1']."(".$row['fio'].")</td><td>".$row['message']."</td><td>".$row['manufacturerName']." ".$row['carName']." ".$row['carAge']." ".$row['carPrice']."руб ".$row['power']."</td><td>".$row['drivers']."</td><td>".$row['skName']." ".$row['realCost']."</td></tr>";
	};
	
	
	echo "</table>";
	
?>
